package homework06;

public class Test05{
    public static void main(String[] args) {
        		Thread t1 = new Thread() {
                    @Override
                    public void run() {
                        Foo.dosome();
                    }
        		};
        		Thread t2 = new Thread() {
                    @Override
                    public void run() {
                        Foo.dosome();
                    }
                };
        		t1.start();
        		t2.start();
    }
}
class Foo{
    public static void dosome() {
		synchronized (Foo.class) {
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println("hello!");
		}
    }
}

